#include <iostream>
#include <fstream>
#include <stdio.h>
using namespace std;

typedef unsigned int INT32;

void setbit(INT32 bits[], int n)
{
	bits[n>>5] |= 1 << (n & 0x1F);
}

int getbit(INT32 bits[], int n)
{
	return (bits[n>>5] & 1 << (n & 0x1F) ) == 0 ? 0 : 1;
}

int main()
{
	INT32 bits[100];
	memset(bits, 0, 100*4);
	
	ifstream infile;
	infile.open("unsorted.txt");
	if(infile)
	{
		int temp;
		while(infile>>temp)
			setbit(bits, temp);
		for(int i=0; i<100*32; i++)
		{
			if(getbit(bits, i))
			{
				cout<<i<<endl;
			}
		}
	}			

	return 0;
}
